<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>新增卡券</title>
    <meta name="viewport"
     content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-slide.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/common.css" />
    <link rel="stylesheet" type="text/css" href="css/editstyle.css" />
    <link rel="stylesheet" type="text/css" href="css/public.css" />
    <link rel="stylesheet" type="text/css" href="css/activity.css" />

</head>

<body>
    <!-- v-cloak -->
    <div id="app" v-cloak>
        <van-calendar v-model="showTime" :show-confirm="false" type="range"  @confirm="onConfirm" ></van-calendar>
        <section class="bodymain">
            <!-- 销售信息 -->
            <div class="order_detail mt10">
                <div class="dcwj_con2">
                    <div class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">卡券类型<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr">
                            <label class="label-radio">
                                <input class="aui-radio" v-on:click="do_select_type(2)" v-bind:checked="form.CouponType==2"
                                    style="margin-right: 10px; position: relative; top:5px; width: 1rem; height: 1rem; border-radius: 20px;"
                                    type="radio" name="PlanType">折扣券
                            </label>
                            <label class="label-radio">
                                <input class="aui-radio" v-on:click="do_select_type(1)" v-bind:checked="form.CouponType==1"
                                    style="margin-right: 10px; width: 1rem; position: relative; top:5px; height: 1rem; border-radius: 20px;"
                                    type="radio" name="PlanType">满减券
                            </label>
                        </div>
                    </div>
                    <div class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">卡券名称<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr">
                            <input type="text" placeholder="请输入活动名称" v-model="form.CouponName">
                        </div>
                    </div>
                    <div v-if="form.CouponType==2" class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">折扣<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr">
                            <input type="number" placeholder="请输入" v-model="form.DiscountNum">
                        </div>
                    </div>
                    <div v-if="form.CouponType==1" class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">减免金额<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr">
                            <input type="number" placeholder="例:20元" v-model="form.DiscountMoney">
                        </div>
                    </div>
                    <div class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">发行数量<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr">
                            <input type="number" placeholder="请输入" v-model="form.PublishNumber">
                        </div>
                    </div>
                    <div class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">有效期<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr" v-on:click="choose_time()">
                            <input class="fl" type="text" placeholder="请选择" v-model="youxiaoTime" style="width: 90%;" readonly unselectable="on">
                            <i class="icon iconfont icon-gengduo fr"></i>
                        </div>
                    </div>
                    <div v-if="form.CouponType==1" class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">满减金额<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr">
                            <input type="number" placeholder="例:满200元使用" v-model="form.ReduceNum">
                        </div>
                    </div>
                    <div class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">可用范围<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr">
                            <label class="label-radio font7" >
                                <input class="aui-radio" v-on:click="do_select_fenlei(4)" v-bind:checked="form.Type==4"
                                    style="margin-right: 10px; position: relative; top:5px; width: 1rem; height: 1rem; border-radius: 20px;"
                                    type="radio" name="fenlei">指定分类
                            </label>
                            <label class="label-radio font7">
                                <input class="aui-radio" v-on:click="do_select_fenlei(5)" v-bind:checked="form.Type==5"
                                    style="margin-right: 10px; width: 1rem; position: relative; top:5px; height: 1rem; border-radius: 20px;"
                                    type="radio" name="fenlei">指定商品
                            </label>
                        </div>
                    </div>
                    <div class="dcwj_list">
                        <div class="fmly_lft color9 alline">使用说明</div>
                        <div class="dcwj_left alline pt6">
                            <textarea id="textarea" placeholder="请输入" v-model="form.Remark"></textarea>
                        </div>
                    </div>
                    <!-- <div class="dcwj_list bor_bottom">
                        <div class="fmly_lft color9 fl">所属项目<i
                                class="icon iconfont icon-bitianxiang- redcolor bitian"></i></div>
                        <div class="dcwj_left fr">
                            <input class="fl" type="text" placeholder="请选择" style="width: 90%;" readonly unselectable="on">
                            <i class="icon iconfont icon-gengduo fr"></i>
                        </div>
                    </div> -->
                    
                    
                    
                </div>
            </div>
            <div class="order_detail mt15">
                <div class="pro_choose font7 color9">已选择 {{list.length}} 种商品
                    <span v-if="form.Type==4" class=" font6 fr" v-on:click="choose_fenlei()">重选</span>
                    <i v-if="form.Type==5" class="icon iconfont icon-xinzeng fr" v-on:click="add_product()"></i>
                </div>
                <div v-if="form.Type==5" class="order_product">
                    <ul class="aui-list aui-media-list" style="background-size:100% 0px; border: none;">
                        <li class="aui-list-item" v-for="item in list" style="border: none; background-size:100% 0px; position: relative;">
                            <div class="aui-media-list-item-inner btn_line" v-on:click="do_openjilu(item.ID)">
                                <div class="aui-list-item-media">
                                    <img :src="item.CoverImage">
                                </div>
                                <div class="aui-list-item-inner">
                                    <div class="pro-list-item-title aui-ellipsis-2">
                                        {{item.Name}}
                                    </div>
                                    <div class="pro_type">
                                        <div class="pro_type_item  aui-ellipsis-1">型号名称：{{item.TypeTitle}}</div>
                                        <div class="pro_type_item aui-ellipsis-1">销售价：￥{{item.SalePrice}}</div>
                                    </div>
                                </div>
                            </div>
                            <div class="order_pro_fk">
                                <div class="or_pro_rgt">
                                    <div class="or_pro_fk" v-on:click="updatenum(item.ID)">移除</div>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>

                <div v-if="form.Type==4" class="tree_all" style="width: 90%; margin: 20px auto;">
                    <div class="tree_item">
                        <div class="tree_item_lft aui-ellipsis-1 fl" v-on:click="do_openall()">
                            <i v-if="showAll" class="icon iconfont icon-zhankai color9"></i>
                            <i v-if="!showAll" class="icon iconfont icon-gengduo font7 color9"></i>
                            <span class="font8">全部分类
                        </div>
                        <div class="tree_item_rgt fr font65 color9">
                           15种商品
                        </div>
                    </div>
                    <div v-if="showAll" class="tree_all pl25" v-for="item in fenleilist">
                        <div class="tree_item">
                            <div class="tree_item_lft aui-ellipsis-1 fl"  v-on:click="do_opentype()">
                                <i v-if="showMenu" class="icon iconfont icon-zhankai color9"></i>
                                <i v-if="!showMenu" class="icon iconfont icon-gengduo font7 color9"></i>
                                 {{item.Name}}
                            </div>
                            <div class="tree_item_rgt fr font65 color9">
                                5种商品
                            </div>
                        </div>
                        <div v-if="showMenu" class="tree_all pl25" v-for="item2 in item.children">
                            <div class="tree_item pl15">
                                <div class="tree_item_lft aui-ellipsis-1 fl">
                                    {{item2.Name}}
                                </div>
                                <div class="tree_item_rgt fr font65 color9">
                                    5种商品
                                </div>
                            </div>
                        </div>
                    </div>
                    
                </div>



            </div>
        </section>
        <div class="pagebtn">
            <div class="buttom longwidth" v-on:click="do_saveProduct()">保存</div>
        </div>
    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-actionsheet.js"></script>
<script type="text/javascript" src="../script/aui-slide.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../script/mui/mui.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.picker.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.poppicker.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript " src="js/youhuiCard_add.js"></script>



</html>